package observer.adapter.impl;

import observer.invest.Observer;
import observer.invest.Subject;
import observer.adapter.InvestHandler;

//接口适配器
public class InvestAdapter implements Observer {
    InvestHandler investHandler;

    public InvestAdapter(InvestHandler handler) {
        investHandler = handler;
    }

    @Override
    public String getName() {
        return investHandler.getName();
    }

    @Override
    public void onWave(Subject subject,int range) {
        investHandler.handleBigWave(subject,range);
    }
}
